package com.ezops.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import com.fasterxml.jackson.annotation.JsonProperty;

public class CashBalanceCurrencyAmountModel implements Serializable {

	
	public static List<CashBalanceCurrencyAmountModel> adaptTo(Map<String, List<Double>> data){
		List<CashBalanceCurrencyAmountModel> allModels = new ArrayList<>(data.size());
		for(Map.Entry<String, List<Double>> entry : data.entrySet()){
			CashBalanceCurrencyAmountModel model = new CashBalanceCurrencyAmountModel();
			model.setData(entry.getValue());
			model.setValue(entry.getKey());
			allModels.add(model);
		}
		
		return allModels;
	}
	/**
	 * 
	 */
	private static final long serialVersionUID = -2695944883325681021L;
	@JsonProperty("name")
	private String value;
	private List<Double> data;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public List<Double> getData() {
		return data;
	}

	public void setData(List<Double> data) {
		this.data = data;
	}

}
